package com.customers.service;

import com.customers.entity.Customer;
import com.customers.entity.MainForm;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface CustomerService {
    /**
     * 客户表单service操作
     */
    public  void MainFormSubmit(MainForm form, List<com.customers.entity.Customer> customers,String customerSql,String contactSql,String getIdSql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;

    public  void deleteCustomer(MainForm form,String sql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;

    public  void editForm(MainForm mainForm,String sql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;

    public  List<MainForm> searchAll(String sql) throws SQLException;
    public  List<MainForm> searchFor(String name,String sql) throws SQLException;

    public Integer getCustomerId(MainForm form,String sql) throws SQLException;

    /**
     * 联系人表单service操作
     */
    public  void deleteContact(Customer customer, String sql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;
    public List<com.customers.entity.Customer> searchForContact(Integer id,String sql) throws SQLException;
    public void addContact(com.customers.entity.Customer customer,String sql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;

    public int getNowId(String name);
    public void editContact(com.customers.entity.Customer customer,String sql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;
}
